// 导出配置的scrollReveal 如果这个方法需要传参 记得要给他传参哦
export default function retScroll (data) {
  data.scrollReveal.reveal('#reveal-top', {
    // 动画的时长
    duration: 600,
    // 延迟时间
    delay: 300,
    // 动画开始的位置，'bottom', 'left', 'top', 'right'
    origin: 'bottom',
    // 回滚的时候是否再次触发动画
    reset: true,
    // 延时执行方式（always（一直延时执行），once（只延时执行一次），onload（只在加载时延时执行））
    // // useDelay: 'onload',
    // 在移动端是否使用动画
    mobile: true,
    // 滚动的距离，单位可以用%，rem等
    distance: '10px',
    // 其他可用的动画效果
    opacity: 0.01,
    // 执行速度 线性函数啥的
    easing: 'cubic-bezier(0.5, 0, 0, 1)',
    // 执行方式（缩放）
    scale: 0.9,
    // 使用执行之前的回调函数
    beforeReveal: function (ele) {
       // console.log(1);
     }
  })
  data.scrollReveal.reveal('#reveal-introduce', {
    // 动画的时长
    duration: 800,
    // 延迟时间
    delay: 500,
    // 动画开始的位置，'bottom', 'left', 'top', 'right'
    origin: 'bottom',
    // 回滚的时候是否再次触发动画
    reset: true,
    // 延时执行方式（always（一直延时执行），once（只延时执行一次），onload（只在加载时延时执行））
    useDelay: 'onload',
    // 在移动端是否使用动画
    mobile: true,
    // 滚动的距离，单位可以用%，rem等
    distance: '10px',
    // 其他可用的动画效果
    // 执行速度 线性函数啥的
    easing: 'cubic-bezier(0.5, 0, 0, 1)',
    // 执行方式（缩放）
    scale: 0.9,
    // 执行之前回调
    beforeReveal: function (ele) {

    }
  })
  data.scrollReveal.reveal('#item', {
    reset: true,
    distance: '50px',
    origin: 'left',
    interval: 80,
    opacity: 0.1,
    rotate: {
      x: 20,
      z: 20
    },
    scale: 0.6,
    // 执行之前回调
    beforeReveal: function (ele) {
      // console.log(1)
    }
  })

  data.scrollReveal.reveal('#reveal-fade-in', {
    duration: 500,
    delay: 200,
    origin: 'top',
    reset: true,
    mobile: true,
    distance: '0px', // No movement, just fade in
    opacity: 0,
    easing: 'ease-in-out',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Fade in effect');
    }
  });

  data.scrollReveal.reveal('#reveal-zoom-in', {
    duration: 700,
    delay: 400,
    origin: 'center', // Zoom effect does not necessarily have an origin
    reset: true,
    mobile: true,
    distance: '0px', // No movement, just zoom in
    opacity: 0,
    easing: 'ease-out',
    scale: 0.5,
    beforeReveal: function (ele) {
      // console.log('Zoom in effect');
    }
  });

  data.scrollReveal.reveal('#reveal-slide-right1', {
    duration: 600,
    delay: 300,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '20px',
    opacity: 0.2,
    easing: 'ease-in',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Slide right effect');
    }
  });

  data.scrollReveal.reveal('#reveal-slide-right2', {
    duration: 600,
    delay: 300,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '60px',
    opacity: 0.2,
    easing: 'ease-in',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Slide right effect');
    }
  });

  data.scrollReveal.reveal('#reveal-slide-right3', {
    duration: 600,
    delay: 900,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '60px',
    opacity: 0.2,
    easing: 'ease-in',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Slide right effect');
    }
  });

  data.scrollReveal.reveal('#reveal-slide-right4', {
    duration: 600,
    delay: 1500,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '60px',
    opacity: 0.2,
    easing: 'ease-in',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Slide right effect');
    }
  });

  data.scrollReveal.reveal('#reveal-flip', {
    duration: 1000,
    delay: 500,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '0px', // No movement, just flip
    opacity: 0.1,
    easing: 'ease-in-out',
    scale: 1,
    rotate: {
      x: 0,
      y: 180,
      z: 0
    },
    beforeReveal: function (ele) {
      // console.log('Flip effect');
    }
  });

  data.scrollReveal.reveal('#reveal-bounce', {
    duration: 800,
    delay: 400,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '30px',
    opacity: 0.3,
    easing: 'cubic-bezier(0.68, -0.55, 0.27, 1.55)', // Bounce effect
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Bounce effect');
    }
  });

  // 我们的特色
  data.scrollReveal.reveal('#reveal-sub-title', {
    duration: 400,
    delay: 300,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '30px',
    opacity: 0.3,
    easing: 'cubic-bezier(0.68, -0.55, 0.27, 1.55)', // Bounce effect
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Bounce effect');
    }
  });

  data.scrollReveal.reveal('#reveal-card4-1', {
    duration: 800,
    delay: 300,
    origin: 'left',
    reset: true,
    mobile: true,
    distance: '40px',
    opacity: 0.2,
    easing: 'ease-in',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Slide right effect');
    }
  });

  data.scrollReveal.reveal('#reveal-card4-2', {
    duration: 800,
    delay: 300,
    origin: 'left',
    reset: true,
    mobile: true,
    distance: '40px',
    opacity: 0.2,
    easing: 'ease-in',
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Slide right effect');
    }
  });

  // 房地产页面
  data.scrollReveal.reveal('#reveal-real-estate', {
    duration: 800,
    delay: 400,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '30px',
    opacity: 0.3,
    easing: 'cubic-bezier(0.68, -0.55, 0.27, 1.55)', // Bounce effect
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Bounce effect');
    }
  });

  // 房地产页面
  data.scrollReveal.reveal('#reveal-supplier', {
    duration: 800,
    delay: 400,
    origin: 'bottom',
    reset: true,
    mobile: true,
    distance: '30px',
    opacity: 0.3,
    easing: 'cubic-bezier(0.68, -0.55, 0.27, 1.55)', // Bounce effect
    scale: 1,
    beforeReveal: function (ele) {
      // console.log('Bounce effect');
    }
  });
}